package com.syz.controller;

import com.syz.service.ICourseService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

//<bean name="studentController" class="com.syz.controller.StudentController">
//    <property name="studentService" ref="studentService"/>
//</bean>
//@Controller相当于在xml中写的上面的bean，默认的名字是类名首个单词小写

@Controller("courseController")
//@Controller
public class CourseController {

    //<property name="studentService" ref="studentService"/>
    @Resource(name = "courseService")
    private ICourseService courseService;

    public void selectAll() {
        System.out.println("CourseController.selectAll");
        courseService.selectAll();
    }
}
